/*
 *	Copyright (C) 2007-2009 Gabest
 *	http://www.gabest.org
 *
 *  This Program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *
 *  This Program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with GNU Make; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 *  http://www.gnu.org/copyleft/gpl.html
 *
 */

#pragma once

class GSdxApp
{
	static std::string m_ini;
	static const char* m_section;

public:
	GSdxApp();

#ifdef _WINDOWS
 	HMODULE GetModuleHandle();
#else
    void *GetModuleHandle();
#endif

	string GetConfig(const char* entry, const char* value);
	void SetConfig(const char* entry, const char* value);
	int GetConfig(const char* entry, int value);
	void SetConfig(const char* entry, int value);

	void SetConfigDir(const char* dir);
};

enum FiltersDX9
{
	fDX9_Default = 0,
	fDX9_None,
	fDX9_Nearest,
	fDX9_Linear,
	fDX9_Anisotropic,
	fDX9_Tent,
	fDX9_Gaussian,
};
/*
D3D11_FILTER_MIN_MAG_MIP_POINT	= 0,
	MIN_MAG_POINT   MIP_LINEAR
	MIN_POINT       MAG_LINEAR      MIP_POINT
	MIN_POINT       MAG_MIP_LINEAR
	MIN_LINEAR      MAG_MIP_POINT
	MIN_LINEAR      MAG_POINT      MIP_LINEAR	= 0x11,
	MIN_MAG_LINEAR  MIP_POINT	= 0x14,
	MIN_MAG_MIP_LINEAR      	= 0x15,

	ANISOTROPIC	= 0x55,

	D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT	= 0x80,
	D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR	= 0x81,
	D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT	= 0x84,
	D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR	= 0x85,
	D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT	= 0x90,
	D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR	= 0x91,
	D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT	= 0x94,
	D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR	= 0x95,
	D3D11_FILTER_COMPARISON_ANISOTROPIC	= 0xd5
*/
enum FiltersDX11
{
	fDX11_Default = 0,

	fDX11_MinMagMipNearest,
	fDX11_MinMagNearest_MipLinear,
	fDX11_MinNearest_MagLinear_MipNearest,
	fDX11_MinNearest_MagMipLinear,
	fDX11_MinLinear_MagMipNearest,
	fDX11_MinLinear_MagNearest_MipLinear,
	fDX11_MinMagLinear_MipNearest,
	fDX11_MinMagMipLinear,

	fDX11_Comparison_MinMagMipNearest,
	fDX11_Comparison_MinMagNearest_MipLinear,
	fDX11_Comparison_MinNearest_MagLinear_MipNearest,
	fDX11_Comparison_MinNearest_MagMipLinear,
	fDX11_Comparison_MinLinear_MagMipNearest,
	fDX11_Comparison_MinLinear_MagNearest_MipLinear,
	fDX11_Comparison_MinMagLinear_MipNearest,
	fDX11_Comparison_MinMagMipLinear,

	fDX11_Anisotropic,
	fDX11_Comparison_Anisotropic,
};

extern GSdxApp theApp;
